﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace CoolCode.Web.Mvc
{
    public static  class ActionResultExtensions
    {
        public static XmlResult Xml<T>(this Controller controller , T model)
        {
            return new XmlResult(model);
        }

        public static MessageResult Message(this Controller controller, bool success)
        {
            return new MessageResult(success);
        }

        public static MessageResult Message(this Controller controller, bool success, string message)
        {
            return new MessageResult(success, message);
        }
    }
}
